package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.pojos.WmNewsMaterial;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WmNewsMaterialMapper extends BaseMapper<WmNewsMaterial> {
    /**
     * 批量保存文章和素材对应关系
     * @param ids   素材的id集合
     * @param newsId  文章id
     * @param type   0表示内容   1是封面
     */
    void saveRelation(@Param("ids") List<Integer> ids,
                      @Param("newsId") Integer newsId,
                      @Param("type") Short type);
}
